<%@page import="com.blog.dao.ArticleDao"%>
<%@page import="com.blog.dto.Article"%>
<%@page import="java.util.Vector"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<div>
		<%
		String content = null;
		if(request.getMethod().equals("GET")){
			Vector<Article> vArticle = new Vector<Article>();
			ArticleDao articleDao = new ArticleDao();
			int article_id = Integer.parseInt(request.getParameter("article_id"));
			vArticle = articleDao.findArticleById(article_id);
			content = vArticle.get(0).getContent();
		}else{
			content = (String)request.getAttribute("content");
			
		}
		%>

		<%
			out.print(content);
		%>
		
	</div>
</body>
</html>